import request from '@/utils/request'

// 查询工序物料清单列表
export function listProcedureMaterial(query) {
  return request({
    url: '/yyj/pbs/procedureMaterial/list',
    method: 'get',
    params: query
  })
}

// 查询工序物料清单详细
export function getProcedureMaterial(pdCode) {
  return request({
    url: '/yyj/pbs/procedureMaterial/' + pdCode,
    method: 'get'
  })
}

export function getProcedureSelfData(query) {
  return request({
    url: '/yyj/pbs/procedureMaterial/getSelfDetail',
    method: 'get',
    params: query
  })
}

// 新增工序物料清单
export function addProcedureMaterial(data) {
  return request({
    url: '/yyj/pbs/procedureMaterial',
    method: 'post',
    data: data
  })
}

// 修改工序物料清单
export function updateProcedureMaterial(data) {
  return request({
    url: '/yyj/pbs/procedureMaterial',
    method: 'put',
    data: data
  })
}

// 删除工序物料清单
export function delProcedureMaterial(pdCode) {
  return request({
    url: '/yyj/pbs/procedureMaterial/' + pdCode,
    method: 'delete'
  })
}
